<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
  <head th:replace="fragments :: html_head('Login','none')"></head>
  <body>
    <div>
      <div class="custom-form">
        <div class="row">
          <div class="col-md-3 custom-form-left">
            <img src="https://image.ibb.co/n7oTvU/logo_white.png" alt="" />
            <h3>Don't have an account yet?'</h3>
            <a th:href="@{/users/new}" class="btn btn-light m-5"
              >Create new account</a
            >
          </div>
          <div class="col-md-9 custom-form-right">
            <div class="tab-content" id="myTabContent">
              <div
                class="tab-pane fade show active"
                id="home"
                role="tabpanel"
                aria-labelledby="home-tab"
              >
                <img class="login-img" th:src="@{/images/logo.png}" />
                <h3 class="custom-form-heading">Login | ShopWise Admin</h3>
                <form
                  th:action="@{/login}"
                  method="post"
                  class="row custom-form-form"
                >
                  <div th:if="${param.error}">
                    <p class="text-danger">
                      [[${session.SPRING_SECURITY_LAST_EXCEPTION.message}]]
                    </p>
                  </div>
                  <div th:if="${param.logout}">
                    <p class="text-warning">
                      You've been logged out successfully
                    </p>
                  </div>

                  <div class="col-md-12">
                    <div class="form-group">
                      <input
                        type="email"
                        class="form-control"
                        placeholder="Your Email"
                        name="email"
                        required
                        minlength="8"
                        maxlength="128"
                      />
                    </div>
                    <div class="form-group">
                      <input
                        type="password"
                        class="form-control"
                        placeholder="Password"
                        name="password"
                        minlength="8"
                        maxlength="20"
                        required
                      />
                    </div>
                    <p>
                      <input type="checkbox" name="remember-me" />&nbsp;
                      Remember Me
                    </p>
                    <input
                      type="submit"
                      class="btn btn-wise btn-wise-sm"
                      th:value="Login"
                    />
                  </div>
                </form>
              </div>
            </div>
          </div>
        </div>
      </div>
    </div>

    <div th:replace="fragments_modal :: modal_dialog">Modal Dialog</div>

    <div th:replace="footer :: footer">Footer</div>
  </body>
</html>
